package SparkRDD.RDD算子.Actions

import org.apache.spark.{SparkConf, SparkContext}
import org.junit.Test

class collectTest {
  val conf = new SparkConf().setMaster("local[6]").setAppName("sample")
  val sc   = new SparkContext(conf)

  @Test
  def collectTest: Unit ={
    sc.parallelize(Seq(("a",1),("b",2),("c",3)))
      .mapValues(item => item*10)
      .collect()
      .foreach(println(_))
  }
}
